using System.Xml.Serialization;

namespace CurrencyConv.Core
{
	[XmlRoot]
	public class ExchangeRate
	{
		// This used to have readonly private variables instead of properties.
		// XmlSerialization .... will not work unfortunately.
		// So bye bye value object :(
		public ExchangeRate()
		{
			
		}

		public ExchangeRate(Money @from, Money to, decimal rate)
		{
			From = from;
			To = to;
			Rate = rate;
		}

		public Money From { get; private set; }

		public Money To { get; private set; }

		public decimal Rate { get; private set; }
	}
}